<template>
    <view>
		<j-cell-group>
			<j-cell :title="$t('General.mine.clearCache')" @jftap="bindjftapClear"></j-cell>
		</j-cell-group>
			
		<!-- <j-cell-group>
			<j-cell title="手机号码" more="{{false}}">
				<view slot="tips">
					<button type="primary" plain size="mini" style="line-height:1.75; font-size:24rpx;">去绑定</button>
				</view>
			</j-cell>
			<j-cell type="primary" title="邮箱" more="{{false}}">
				<view slot="tips">
					<button plain size="mini" style="line-height:1.75; font-size:24rpx;">去绑定</button>
				</view>
			</j-cell>
		</j-cell-group>
		<j-cell-group>
			<j-cell title="微信" tips="已绑定"></j-cell>
		</j-cell-group>
		<j-cell-group> 
			<j-cell title="修改密码"></j-cell>
			<j-cell title="删除账号"></j-cell>
		</j-cell-group> -->
	</view>
</template>

<script>
export default {
    data() {
        return {
            userInfo: {}
        };
    }
    /**
     * 生命周期函数--监听页面加载
     */,
    onLoad: function (options) {
        console.log('=== mine:setting:onLoad:');
    },
    /**
     * 生命周期函数--监听页面初次渲染完成
     */
    onReady: function () {
        console.log('=== mine:setting:onReady:');
    },
    /**
     * 生命周期函数--监听页面显示
     */
    onShow: function () {
        console.log('=== mine:setting:onShow:');
        this.userInfo = uni.getStorageSync('userInfo')
        uni.setNavigationBarTitle({
            title: this.$t('navBarTitle.setting')
        })
    },
    /**
     * 生命周期函数--监听页面隐藏
     */
    onHide: function () {
        console.log('--- mine:setting:onHide:');
    },
    /**
     * 生命周期函数--监听页面卸载
     */
    onUnload: function () {
        console.log('--- mine:setting:onUnload:');
    },
    /**
     * 页面相关事件处理函数--监听用户下拉动作
     */
    onPullDownRefresh: function () {},
    /**
     * 页面上拉触底事件的处理函数
     */
    onReachBottom: function () {},
    /**
     * 用户点击右上角分享
     */
    onShareAppMessage: function () {},
    methods: {
        // 清除缓存
        bindjftapClear() {
			uni.showModal({
				title: this.$t('General.family.tip'),
				content:this.$t('General.device.clearCache'),
				success:(res) =>{
					if(res.confirm){
						uni.showToast({
						    title: this.$t('General.device.clearMsg'),
						    icon: 'loading',
						    success: (res1) => {
						        console.log(res1);
						        uni.removeStorage({
						            key: 'deviceList',
						            success: (res2) => {
						                console.log(res2);
						            }
						        });
						    }
						});
					}
				}
			})
        }
    }
};
</script>
<style></style>
